import request from '@/utils/request'

export async function getList(params) {
  const response = await request({
    url: '/excel/model',
    method: 'get',
    params
  })
  return response.data
}

export function save(params, data) {
  return request({
    url: '/excel/model',
    method: 'post',
    params,
    data
  })
}

export async function getDetail(excelId) {
  const response = await request({
    url: `/excel/model/${excelId}`,
    method: 'get'
  })
  return response.data
}

export async function delModel(excelId) {
  return request({
    url: `/excel/model/${excelId}`,
    method: 'delete'
  })
}

export async function getTagValue(params) {
  const response = await request({
    url: '/excel/model/tag/value',
    method: 'get',
    params
  })
  return response.data
}

export async function genTagsFormTimeFormat(params) {
  const response = await request({
    url: '/excel/model/tag/time',
    method: 'get',
    params
  })
  return response.data
}
